package com.yuneec.fly.utils;

import com.yuneec.droneservice.command.BaseCommand;
import com.yuneec.droneservice.utils.ByteUtils;

/**
 * Created by jw.gu on 2016/8/22 0022.
 */
public class CommandUtils {
    public static String getLogString(BaseCommand command) {
        byte[] bytes = command.toRawData();
        return command.getClass().getSimpleName() + " : " + ByteUtils.byteArrayToHexString(bytes, 0, bytes.length);
    }

    public static void printLog(BaseCommand command) {
        LogUtils.e(getLogString(command));
    }
}
